package com.itheima10;

import java.util.HashMap;
import java.util.Map;


/**
 * @author Xiao
 * @date 2021/7/27
 */
@SuppressWarnings("all")
public class MapDemo01 {
    /**
     * Map常用方法
     */
    public static void main(String[] args) {
        Map<String, String> m = new HashMap();
        String s = m.put("itheima01", "aaa");
        System.out.println(s);  //  null
        String s1 = m.put("itheima01", "abc");
        System.out.println(s1); //   aaa
        m.put("itheima02", "bbb");
        m.put("itheima03", "ccc");
        System.out.println(m);
        m.remove("itheima02");
        System.out.println(m);
       /* m.clear();
        System.out.println(m);*/
        System.out.println(m.containsKey("itheima"));
        System.out.println(m.containsValue("aaa"));
        System.out.println(m.isEmpty());
        System.out.println(m.size());
    }

}
